// 引入全局样式
import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

//引入element-plus组件库
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
//引入element-plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import axios from "axios";

axios.defaults.baseURL = '/api';
axios.defaults.headers.post["Content-Type"] = "application/json;charset=utf-8";
// 创建vue实例,全局注册element-icon组件
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(router)
app.use(ElementPlus)
app.config.globalProperties.$http = axios;
app.mount('#app')
